'''
首页
'''
from selenium.webdriver.common.by import By

from page_object.add_member_page import AddMemberPage
from page_object.base_page import BasePage
from page_object.contact_page import ContactPage
from selenium import webdriver


class MainPage(BasePage):
    _base_url = 'https://work.weixin.qq.com/wework_admin/frame#index'
    def goto_contact(self):
        '''
        跳转通讯录页面
        :return:
        '''
        return ContactPage(self.driver)

    def goto_add_mem(self):
        '''
        跳转到添加成员页面
        :return:
        '''

        self.driver.find_element(By.CSS_SELECTOR, '.ww_indexImg_AddMember').click()
        return AddMemberPage(self.driver)
